<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="table-scrollable">
	<table class="table table-striped table-hover table-success">
		<thead>
			<tr>
				<th>#</th>
				<th>实例编号</th>
				<th>流程定义编号</th>
				<th>运行到哪个任务</th>
				<th>业务数据</th>
				<th>查看流程图</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${list }" var="item" varStatus="vs">
			<tr>
				<td>${vs.count}</td>
				<td>${item.id}</td>
				<td>${item.processDefinitionId}</td>
				<td>${item.activityId }</td>
				<td>${dataMap[item.id] }</td>
				<td>
					<a onclick="showPng('${item.id}');"><i class="glyphicon glyphicon-picture"></i></a>
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
</div>

<div class="modal fade" tabindex="-1" role="dialog" id="processDefinition_modal">
	  <div class="modal-dialog" role="document" id="png_content">
	  </div>
</div>
<script type="text/javascript">
	
	function showPng(id) {
		
		var url = "${webRoot}/processInstance/showPng/"+id;
		
		$.post(url,{},function(result){
			
			$("#png_content").html(result);
		},"html")
		
		$("#processDefinition_modal").modal(function(){
			backdrop:"static"
		});
	}

</script>
